<!-- 设备历史健康度 -->
<template>
  <div class="health-history" ref="health_history_ref"></div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      msg: "",
      chartInstance: null, // 图表对象
    };
  },
  mounted() {
    this.initChart();
  },
  created() {},
  methods: {
    initChart() {
      this.chartInstance = this.$echarts.init(this.$refs.health_history_ref);
      var option = {
        title: {
          text: "设备历史健康度",
        },
        xAxis: {
          type: "category",
          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            data: [150, 230, 224, 218, 135, 147, 260],
            type: "line",
          },
        ],
      };
      this.chartInstance.setOption(option);
    },
    getData() {},
    updateData() {},
  },
};
</script>

<style scoped>
.health-history {
  position: relative;
  width: 100%;
  height: 100%;
}
</style>